package com.thread.rest;

import com.thread.future.FutureService;
import com.thread.model.service.IUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ccubee
 * @since 21-3-30 22:37
 */
@RestController
@RequestMapping("thread")
@RequiredArgsConstructor
public class ThreadRest {


    private final FutureService futureService;
    private final IUserService userService;


    @GetMapping("sync")
    public void sync() {
        futureService.future();
    }


    @GetMapping("threadPool")
    public void threadPool() {
        userService.threadPool();
    }


    @GetMapping("threadDemo")
    public void threadDemo() {
        userService.threadDemo();
    }
}

